package com.cswangdao.mapper;

import com.cswangdao.domain.dto.AddressPageDTO;
import com.cswangdao.domain.model.MarketAddress;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MarketAddressMapper {

    Page<MarketAddress> pageQueryInfo(AddressPageDTO addressPageDTO);

    MarketAddress getDefaultAddressByUserId(@Param("userId") Integer userId, @Param("isDefault") Integer isDefault);

    MarketAddress getById(Integer addressId);

    List<MarketAddress> getAddressByUserId(int userId);
}